﻿namespace BSU.Math.Geometry
{
    public class RotateAroundYMatrix : Matrix3D
    {
        public RotateAroundYMatrix(double angle, bool isRadians)
            : base()
        {
            if (!isRadians)
            {
                angle = Angle.DegreesToRadians(angle);
            }
            this[0, 0] = System.Math.Cos(angle);
            this[0, 2] = -System.Math.Sin(angle);
            this[2, 0] = System.Math.Sin(angle);
            this[2, 2] = System.Math.Cos(angle);
            this[1, 1] = 1;
        }
    }
}